<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
    <link rel="stylesheet" type="text/css" href="/static/plugin/assets/css/bootstrap-clearmin.min.css">
    <link rel="stylesheet" type="text/css" href="/static/plugin/assets/css/roboto.css">
    <link rel="stylesheet" type="text/css" href="/static/plugin/assets/css/material-design.css">
    <link rel="stylesheet" type="text/css" href="/static/plugin/assets/css/small-n-flat.css">
    <link rel="stylesheet" type="text/css" href="/static/plugin/assets/css/font-awesome.min.css">
    <script type="application/javascript"  src="/static/plugin/assets/js/lib/jquery-2.1.3.min.js"></script>
    <script type="application/javascript"  src="/static/plugin/assets/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="https://apip.weatherdt.com/view/static/js/r.js?v=1111"></script>
    <script type="application/javascript" src="/static/js/vue.js"></script>
    <script type="text/javascript" src="/static/js/base.js"></script>
    <title>车间看板</title>
    <style>
        .box1{
            width: 35%;
            height: 95%;
            float:left;
            background-image: url("/static/images/title06.png");
            background-repeat:no-repeat;
            background-position: 50% 50%;/*这个是按从左往右，从上往下的百分比位置进行调整*/
            background-size:90% 90%;
            -moz-background-size:100% 100%;
        }
        .box2{
            width: 65%;
            height: 95%;
            float: right;
            background-color: #D0D0D0;
            text-align: center;
            line-height: 100px;
            font-size: 20px;
        }
    </style>
    <script>
        WIDGET = {ID: 'BWadbzcp7h'};
    </script>
    <script type="text/javascript">
        var days=new  Array ("日", "一", "二", "三", "四", "五", "六");
        function showDT() {
            var currentDT = new Date();
            var y,m,date,day,hs,ms,ss,theDateStr;
            y = currentDT.getFullYear(); //四位整数表示的年份
            m = currentDT.getMonth(); //月
            date = currentDT.getDate(); //日
            day = currentDT.getDay(); //星期
            hs = currentDT.getHours(); //时
            ms = currentDT.getMinutes(); //分
            ss = currentDT.getSeconds(); //秒
            theDateStr = y+"年"+  m +"月"+date+"日 星期"+days[day];

            theDateStrTime = hs+":"+ms+":"+ss;

            document.getElementById("theClock"). innerHTML =theDateStr;
            document.getElementById("theClockTime"). innerHTML =theDateStrTime;
            // setTimeout 在执行时,是在载入后延迟指定时间后,去执行一次表达式,仅执行一次
            window.setTimeout( showDT, 1000);
        }
    </script>

</head>
<body class="cm-no-transition cm-4-navbar"  onload="showDT()">
<div id="global">
    <div id="app" class="container-fluid" style="margin-left: 0px">
        <div class="row cm-fix-height">
            <div class="col-sm-6">
                <div class="panel panel-default">
                    <div class="panel-heading" style="text-align: left;">
                        <img width="18px" height="18px" src="/static/images/title04.png"></img>&nbsp;&nbsp; 快捷方式
                    </div>
                    <div class="panel-body">
                        <div class="col-md-4" style="height: 100px;">
                            <div class="box1" style="background-color: #1A68CD"></div>
                            <div class="box2">原材料库存</div>
                        </div>
                        <div class="col-md-4" style="height: 100px;">
                            <div class="box1" style="background-color: #0C0C0C"></div>
                            <div class="box2">在制品库存</div>
                        </div>
                        <div class="col-md-4" style="height: 100px;">
                            <div class="box1" style="background-color: #274D62"></div>
                            <div class="box2">成品库存</div>
                        </div>

                        <div class="col-md-4" style="height: 100px;">
                            <div class="box1" style="background-color: #446A55"></div>
                            <div class="box2">库存发货</div>
                        </div>
                        <div class="col-md-4" style="height: 100px;">
                            <div class="box1" style="background-color: #C69745"></div>
                            <div class="box2">物料信息</div>
                        </div>
                        <div class="col-md-4" style="height: 100px;">
                            <div class="box1" style="background-color: #D06032"></div>
                            <div class="box2">BOM信息</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="panel panel-default">
                    <div class="col-md-6" style="padding-left: 0px">
                        <div class="col-md-6" style="background-color: #000000;height: 280px;width: 449px;">
                            <div id="theClock" style="font-size: 15px;color: #FFFFFF;line-height: 211px;text-align: center;height: 180px;">
                            </div>
                            <div id="theClockTime" style="font-size: 45px;color: #FFFFFF;text-align: center;line-height: 0px;">
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div style="line-height: 500px;text-align: center;background-color: #000000;height: 280px;width: 449px;">
                            <iframe  scrolling="no" src="https://tianqiapi.com/api.php?style=ya&skin=apple&color=FFFFFF&fontsize=18&align=center" frameborder="0" width="383px" height="200px" allowtransparency="true"></iframe>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-6">
                <div class="panel panel-default">
                    <div class="panel-heading" style="text-align: left;"><img width="34px" height="34px" src="/static/images/title02.png"></img>最新装配任务</div>
                    <div class="panel-body">

                        <table class="table">
                            <tr>
                                <th>#</th>
                                <th>图号</th>
                                <th>数量</th>
                                <th>单位</th>
                            </tr>
                            <tbody>
                            <tr class="active" v-for="(item, index) in rowData">
                                <th scope="row">1</th>
                                <td>{{item.code}}</td>
                                <td>{{item.name}}</td>
                                <td>{{item.date}}</td>
                            </tr>
                            <tr>
                                <th scope="row">2</th>
                                <td>{{message}}</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr class="success">
                                <th scope="row">3</th>
                                <td>success</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr>
                                <th scope="row">4</th>
                                <td>Column content</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr class="info">
                                <th scope="row">5</th>
                                <td>info</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr>
                                <th scope="row">6</th>
                                <td>Column content</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr class="warning">
                                <th scope="row">7</th>
                                <td>warning</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr>
                                <th scope="row">8</th>
                                <td>Column content</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="col-md-6">
                <div class="panel panel-default">
                    <div class="panel-heading" style="text-align: left;"><img width="25px" height="25px" src="/static/images/title03.png"></img>&nbsp;线上产品信息</div>
                    <div class="panel-body">
                        <table class="table">
                            <thead>
                            <tr>
                                <th>#</th>
                                <th>图号</th>
                                <th>数量</th>
                                <th>单位</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr class="active">
                                <th scope="row">1</th>
                                <td>active</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr>
                                <th scope="row">2</th>
                                <td>Column content</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr class="success">
                                <th scope="row">3</th>
                                <td>success</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr>
                                <th scope="row">4</th>
                                <td>Column content</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr class="info">
                                <th scope="row">5</th>
                                <td>info</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr>
                                <th scope="row">6</th>
                                <td>Column content</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr class="warning">
                                <th scope="row">7</th>
                                <td>warning</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr>
                                <th scope="row">8</th>
                                <td>Column content</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            <tr class="danger">
                                <th scope="row">9</th>
                                <td>danger</td>
                                <td>Column content</td>
                                <td>Column content</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>

                </div>
            </div>
        </div>

    </div>
</div>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            rowData : [],
            message: 'hello'
        },
        created: function() {
            this.rowData = [
                {
                    code: "A2017-001",
                    name: "3800充电器",
                    states: "正常",
                    date: "2017-01-21",
                    admin: "andy"
                },
                {
                    code: "A2017-002",
                    name: "Lenovo Type-c转接器",
                    states: "正常",
                    date: "2017-01-21",
                    admin: "zero"
                }];
            console.log(this.rowData.length)
            console.log(vm.reversedMessage)
        },
        method:{
            add:function() {

            }
        }
    })
</script>
</body>
</html>
